package com.example.luyennghe;

import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import android.util.DisplayMetrics;
import android.view.WindowManager;
import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import android.widget.ScrollView;
import android.widget.TextView;

public class TracNghiemActivity extends Activity {
    private int screenWidth;
    private int screenHeight;
    private ScrollView scrvCauhoi;
    private LinearLayout llButton;
    private TextView tvBaiTracNghiem;
    private RadioGroup rg;
    private RadioButton rad1;
    private RadioButton rad2;
    private RadioButton rad3;
    private RadioButton rad4;
    private Button btnTruoc;
    private Button btnSau;
    private Button btnNopbai;  
    
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.tracnghiem_layout);
        DisplayMetrics displayMetrics = new DisplayMetrics();
        WindowManager wm = (WindowManager) getApplicationContext().getSystemService(Context.WINDOW_SERVICE); // the results will be higher than using the activity context object or the getWindowManager() shortcut
        wm.getDefaultDisplay().getMetrics(displayMetrics);
        screenWidth = displayMetrics.widthPixels;
        screenHeight = displayMetrics.heightPixels;
        
        tvBaiTracNghiem = (TextView)findViewById(R.id.tvBaiTracNghiem);
        scrvCauhoi = (ScrollView)findViewById(R.id.scrvCauhoi);
        llButton = (LinearLayout)findViewById(R.id.llButton);
        rg = (RadioGroup)findViewById(R.id.radGroup);
        rad1 = (RadioButton)findViewById(R.id.rad1);
        rad2 = (RadioButton)findViewById(R.id.rad2);
        rad3 = (RadioButton)findViewById(R.id.rad3);
        rad4 = (RadioButton)findViewById(R.id.rad4);
        btnTruoc = (Button)findViewById(R.id.btnTruoc);
        btnSau = (Button)findViewById(R.id.btnSau);
        btnNopbai = (Button)findViewById(R.id.btnNopbai);
    }
}
